home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness: Critical Thinking Skills / Workplace Effectiveness: Critical Thinking Skills.iso / pc / Files / Clue.dxr / 00026_Show Previous Choice.ls < prev    next >
Encoding:
Text File  |  1998-09-17  |  1.3 KB  |  41 lines

  1. property toggleMember, questionNum, firstSprite, buttonNum
  2. global gClueData
  3.  
  4. on beginSprite me
  5.   set memref to the member of sprite the spriteNum of me
  6.   set castLibNum to the castLibNum of memref
  7.   set the toggleMember of me to member (the memberNum of member memref + 1) of castLib castLibNum
  8.   set the buttonNum of me to the spriteNum of me - (the firstSprite of me - 1)
  9.   getTheChoice(me)
  10. end
  11.  
  12. on getTheChoice me
  13.   set chosenOne to getAt(the clickChoices of gClueData, the questionNum of me)
  14.   case chosenOne of
  15.     #a:
  16.       set vNumber to 1
  17.     #b:
  18.       set vNumber to 2
  19.     #c:
  20.       set vNumber to 3
  21.     #d:
  22.       set vNumber to 4
  23.   end case
  24.   if vNumber = the buttonNum of me then
  25.     SetToggleon(me)
  26.   end if
  27. end
  28.  
  29. on SetToggleon me
  30.   set the member of sprite the spriteNum of me to member the toggleMember of me
  31. end
  32.  
  33. on getPropertyDescriptionList
  34.   set p_list to [#questionNum: [#comment: "Question number for this button:", #format: #integer, #range: [#min: 1, #max: 21], #default: 1], #firstSprite: [#comment: "First sprite of series:", #format: #integer, #range: [7, 8, 9, 10], #default: 7]]
  35.   return p_list
  36. end
  37.  
  38. on getBehaviorDescription
  39.   return "Restores the choices previously made, if any, based on parameters for the sprite and contents of clickChoices list in gClueData. Toggle member MUST follow the initial member in the cast."
  40. end
  41.